# Headers
set(geometry_files_headers
    Frustum.hpp
    HalfPlane.hpp
    lie.hpp
    Pose3.hpp
    rigidTransformation3D.hpp
    Similarity3.hpp
    Intersection.hpp
)

# Sources
set(geometry_files_sources
    rigidTransformation3D.cpp
    Intersection.cpp
)

alicevision_add_library(aliceVision_geometry
    SOURCES ${geometry_files_headers} ${geometry_files_sources}
    PUBLIC_LINKS
        aliceVision_numeric
        aliceVision_linearProgramming
    # PRIVATE_LINKS
        # TODO: fix cross-dependency
        # aliceVision_robustEstimation
)

# Unit tests
alicevision_add_test(rigidTransformation3D_test.cpp NAME "geometry_rigidTransformation3D" LINKS aliceVision_geometry)
alicevision_add_test(halfSpaceIntersection_test.cpp NAME "geometry_halfSpaceIntersection" LINKS aliceVision_geometry)
alicevision_add_test(Pose3d_test.cpp NAME "geometry_pose3D" LINKS aliceVision_geometry)
alicevision_add_test(frustumIntersection_test.cpp
    NAME "geometry_frustumIntersection"
    LINKS aliceVision_geometry
          aliceVision_multiview
          aliceVision_multiview_test_data
)

# SWIG Binding
if (ALICEVISION_BUILD_SWIG_BINDING)
    alicevision_swig_add_library(geometry
        SOURCES Geometry.i
        PUBLIC_LINKS
            aliceVision_geometry
            ${Python3_LIBRARIES}
        PRIVATE_INCLUDE_DIRS
             ../include
            ${ALICEVISION_ROOT}/include
            ${Python3_INCLUDE_DIRS}
            ${Python3_NumPy_INCLUDE_DIRS}
    )
endif()